<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>rtcpsu: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">rtcpsu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('index.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">rtcpsu Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The Xilinx RTC driver component. This component supports the Xilinx RTC Controller. RTC Core and RTC controller are the two main important sub- components for this RTC module. RTC core can run even in the battery powered domain when the power from auxiliary source is down.Because of this, RTC core latches the calibration,programmed time.This core interfaces with the crystal oscillator and maintains current time in seconds.Calibration circuitry calculates a second with maximum 1 PPM inaccuracy using a crystal oscillator with arbitrary static inaccuracy. Core also responsible to maintain control value used by the oscillator and power switching circuitry.</p>
<p>RTC controller includes an APB interface responsible for register access with in controller and core.It contains alarm generation logic including the alarm register to hold alarm time in seconds.Interrupt management using Interrupt status, Interrupt mask, Interrupt enable, Interrupt disable registers are included to manage alarm and seconds interrupts.Address Slave error interrupts are not being handled by this driver component.</p>
<p>This driver supports the following features:</p>
<ul>
<li>Setting the RTC time.</li>
<li>Setting the Alarm value that can be one-time alarm or a periodic alarm.</li>
<li>Modifying the calibration value.</li>
</ul>
<p><b>Initialization &amp; Configuration</b></p>
<p>The <a class="el" href="struct_x_rtc_psu___config.html" title="This typedef contains configuration information for a device. ">XRtcPsu_Config</a> structure is used by the driver to configure itself. Fields inside this structure are properties of <a class="el" href="struct_x_rtc_psu.html" title="The XRtcPsu driver instance data. ">XRtcPsu</a> based on its hardware build.</p>
<p>To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in the following way: </p>
<pre class="fragment"> - XRtcPsu_CfgInitialize(InstancePtr, CfgPtr, EffectiveAddr) - Uses a
 configuration structure provided by the caller. If running in a system
 with address translation, the parameter EffectiveAddr should be the
 virtual address.
</pre><p><b>Interrupts</b></p>
<p>The driver defaults to no interrupts at initialization such that interrupts must be enabled if desired. An interrupt is generated for one of the following conditions.</p>
<ul>
<li>Alarm is generated.</li>
<li>A new second is generated.</li>
</ul>
<p>The application can control which interrupts are enabled using the <a class="el" href="group__rtcpsu.html#ga645920d3519722e8dc815d07db527367" title="This function sets the interrupt mask. ">XRtcPsu_SetInterruptMask()</a> function.</p>
<p>In order to use interrupts, it is necessary for the user to connect the driver interrupt handler, <a class="el" href="group__rtcpsu.html#ga01ca03d23194687c8026dc2f38da6ff7" title="This function is the interrupt handler for the driver. ">XRtcPsu_InterruptHandler()</a>, to the interrupt system of the application. A separate handler should be provided by the application to communicate with the interrupt system, and conduct application specific interrupt handling. An application registers its own handler through the <a class="el" href="group__rtcpsu.html#ga40b45bedf590e3e65eb525f1827768e4" title="This function sets the handler that will be called when an event (interrupt) occurs that needs applic...">XRtcPsu_SetHandler()</a> function.</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who    Date       Changes
</p>
<hr/>
<p>
1.00  kvn    04/21/15 First release
1.1   kvn    09/25/15 Modify control register to enable battery
                      switching when vcc_psaux is not available.
1.3      vak    04/25/16 Corrected the RTC read and write time logic(cr#948833).
1.4      MNK    01/27/17 Corrected calibration and frequency macros based on
                rtc input oscillator frequency ( 32.768Khz).
      ms     03/17/17 Added readme.txt file in examples folder for doxygen
                      generation.
      ms     04/10/17 Modified filename tag in examples to include them in
                      doxygen examples.
1.5   ms     08/27/17 Fixed compilation warnings in <a class="el" href="xrtcpsu_8c.html">xrtcpsu.c</a> file.
      ms     08/29/17 Updated the code as per source code style.
1.6   aru    06/25/18 Modified logic to handle
                 the last day of month cotrrecly.(CR#1004282)
1.6   aru    06/25/18 Remove the checkpatch warnings.
1.6   aru    07/11/18 Resolved cppcheck warnings.
1.6   aru    07/11/18 Resolved doxygen warnings.
1.6   aru    08/17/18 Resolved MISRA-C mandatory violations.(CR#1007752)
1.6   tjs    09/17/18 Fixed compilation warnings.
1.7   sne    03/01/19 Added Versal support.
1.7   sne    03/01/19 Fixed violations according to MISRAC-2012 standards
                      modified the code such as
                      No brackets to loop body,Declared the poiner param
                      as Pointer to const,No brackets to then/else,
                      Literal value requires a U suffix,Casting operation to a pointer
                      Array has no bounds specified,Logical conjunctions need brackets.
1.10     sne    08/28/20 Modify Makefile to support parallel make execution.
1.11     sne    04/23/21 Fixed doxygen warnings.
1.13  ht        06/22/23 Added support for system device-tree flow.
</pre> </div></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
